package com.hy.sender;

import org.springframework.amqp.core.AmqpTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@Component
public class HelloSender {

	 @Autowired
	 private AmqpTemplate template;
	    
	 public void send() {
	    template.convertAndSend("queue","hello,rabbit~");
	 }
}
